*6 Dic 2017
clear

log using statalog, replace

*cd "..."

use MPCareer.dta


***************************************************************************
**Descriptive Statistics***************************************************
***************************************************************************

summarize gender state_school job age_at_entry

tab clust5
tab uni 
tab legislature
*descr stats table for party uni and legislature manually created

***************************************************************************
**Analysis*****************************************************************
***************************************************************************

foreach y in  clust5 clust4 clust3 clust6 clust7 clust8 {



mlogit  `y'  gender state_school job age_at_entry i.uni , vce(robust) base(1)
outreg2 using MPCareer_`y',label replace ctitle (Multinomial Analysis) tex(frag)
mlogit  `y'  gender state_school job age_at_entry i.uni i.party_n byelections , vce(robust) base(1)
outreg2 using MPCareer_`y',label append ctitle (Multinomial Analysis) tex(frag)
mlogit  `y'  gender state_school job age_at_entry i.uni i.party_n byelections i.legislature  , vce(robust) base(1)
outreg2 using MPCareer_`y',label append ctitle (Multinomial Analysis) tex(frag)

}

***************************************************************************
**Analysis - Oxbridge******************************************************
***************************************************************************
use MPCareer_uni.dta

foreach y in  clust5 clust4 clust3 clust6 clust7 clust8 {



mlogit  `y'  gender state_school job age_at_entry Oxbridge , vce(robust) base(1)
outreg2 using MPCareer_ox_`y',label replace ctitle (Multinomial Analysis) tex(frag)
mlogit  `y'  gender state_school job age_at_entry Oxbridge i.party_n byelections , vce(robust) base(1)
outreg2 using MPCareer_ox_`y',label append ctitle (Multinomial Analysis) tex(frag)
mlogit  `y'  gender state_school job age_at_entry Oxbridge i.party_n byelections i.legislature  , vce(robust) base(1)
outreg2 using MPCareer_ox_`y',label append ctitle (Multinomial Analysis) tex(frag)

}
